<?php 
	if (isset($_POST['capnhat']))
	{
		$TenThanhVien =$_REQUEST['TenThanhVien'];
		$HoTen = $_REQUEST['HoTen'];
		$GioiTinh = $_REQUEST['GioiTinh'];
		$NgaySinh = $_REQUEST['NgaySinh'];
		$DiaChi = $_REQUEST['DiaChi'];
		$DienThoai = $_REQUEST['DienThoai'];	
		$Email = $_REQUEST['Email'];	
		$QuyenTruyCap = $_REQUEST['level'];	
		$TinhTrang = $_REQUEST['TinhTrang'];		
		$MaThanhVien=$_REQUEST['MaThanhVien'];
		include "connection.php";
		$sql="UPDATE thanhvien SET MaThanhVien='".$MaThanhVien."', TenThanhVien='".$TenThanhVien."', HoTen='".$HoTen."', GioiTinh='".$GioiTinh."', NgaySinh='".$NgaySinh."', DiaChi='".$DiaChi."', DienThoai='".$DienThoai."', Email='".$Email."', QuyenTruyCap='".$QuyenTruyCap."', TinhTrang='".$TinhTrang."'
		WHERE MaThanhVien='" .$MaThanhVien."'";
		if (!mysql_query($sql))
		{
			die('Error: ' . mysql_error());
		}
		header("location:../MyModel/TrangAD_qlthanhvien.php");
		mysql_close($con);
	}
?>